-- GENERATED SPELL FOR [Ango'rosh Warlock] --


function spell0_19732(pUnit, Event) --@Demon Armor,Self--
pUnit:FullCastSpellOnTarget(13787,pUnit)
pUnit:RegisterEvent('Sorts_19732', 0, 1)
end

function spell1_19732(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19732', 3000, 1)
end

function spell2_19732(pUnit, Event) --@Summon Imp,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(11939,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_19732', 1, 1)
end

function spell3_19732(pUnit, Event) --@Summon Succubus,Self--
pUnit:FullCastSpellOnTarget(8722,pUnit)
pUnit:RegisterEvent('Sorts_19732', 631, 1)
end

function Sorts_19732(pUnit, Event)
local choix_sorts_19732 = math.random(0, 3)
if choix_sorts_19732 == 0 then
pUnit:RegisterEvent('spell0_19732', 1, 1)
end
if choix_sorts_19732 == 1 then
pUnit:RegisterEvent('spell1_19732', 1, 1)
end
if choix_sorts_19732 == 2 then
pUnit:RegisterEvent('spell2_19732', 1, 1)
end
if choix_sorts_19732 == 3 then
pUnit:RegisterEvent('spell3_19732', 1, 1)
end
end

function mob19732_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19732', math.random(1500, 3000), 1)
end

function mob19732_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19732_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19732_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19732, 1, 'mob19732_Action')
RegisterUnitEvent(19732, 2, 'mob19732_Leave')
RegisterUnitEvent(19732, 3, 'mob19732_Kill')
RegisterUnitEvent(19732, 4, 'mob19732_Die')
